package com.godyao.mall.user.boot.repository;

import com.godyao.mall.user.common.model.SysRole;
import com.godyao.mall.user.common.model.SysUser;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

/**
 * @author godyao
 * @date 2022/4/2
 */
public interface SysUserRepository extends JpaRepository<SysUser, Long> {
    List<SysUser> findByUserIdInAndStatus(List<String> userIds, Integer status);

    Optional<SysUser> findByUsernameAndStatus(String username, Integer status);

    Optional<SysUser> findByUserIdAndStatus(String userId, Integer status);
}
